<template>
  <div>
    <el-card>
      <div class="box">{{ $t("总金额") }}:{{ money || 0 }}</div>
    </el-card>
  </div>
</template>
<script>
import { getuseraumountApi } from "../../../api/appuser/userList";

export default {
  data() {
    return {
      money: `${this.$t("加载中")}`,
    };
  },
  created() {
    this.getuseraumount();
  },
  methods: {
    async getuseraumount() {
      // if (!this.$route.query.userId) {
      //     this.$message.error('请先到用户列表选择对应用户')
      //     this.$router.push('/system/userList')
      //     return
      // }
      const res = await getuseraumountApi();
      //     {
      //     userId: this.$route.query.userId
      // }
      console.log(res);
      this.money = res.totalAmount;
    },
  },
};
</script>
<style lang="scss" scoped>
.box {
  // width: 200px;
  height: 200px;
  font-size: 30px;
}
</style>
